<?php
namespace Admin\Controller;

use Think\Page;

class OrderController extends CommonController
{
    public $model = null;

    public function __construct()
    {
        parent::__construct();
        $this->model = M('order');
    }

    public function index()
    {
    	$User = M("order");
    	$order=$User->select();
    	$this->assign("order", $order);
    	$this->display();
    }
    public function update()
    {
        $id = $_GET['id'];
    	$order = M("order");
        $order_content=$order->where(['id' => $id])->find();
        $user = M("user");
        $user_order = $user->where(['id'=> $order_content['user_order']])->find();
        $this->assign("user_name", $user_order);
        $this->assign("order", $order_content);
    	$this->display();
    }
   
}
